package work4;

public class Quetion2 {
	public static void main(String[] args) {
		System.out.println("[100,1000)内的水仙花数如下：");
		for (int i = 100; i < 1000; i++) {
			if (i == Math.pow(i % 10, 3) + Math.pow(i / 10 % 10, 3) + Math.pow(i / 100, 3)) {
				System.out.print(i + " ");
			}
		}
		System.out.println();
	}
}
